//
//  OrderCell.m
//  AppointmentForCar
//
//  Created by Herron on 16/10/3.
//  Copyright © 2016年 Herron. All rights reserved.
//

#import "OrderCell.h"

@interface OrderCell()

@property (weak, nonatomic) IBOutlet UILabel *historyDateTimeLabel;
@property (weak, nonatomic) IBOutlet UILabel *historyIsCompleteLabel;
@property (weak, nonatomic) IBOutlet UILabel *historyOriginLabel;
@property (weak, nonatomic) IBOutlet UILabel *historyDestinationLabel;
@property (weak, nonatomic) IBOutlet UILabel *historyDriverNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *historyDriverPhoneLabel;
@property (weak, nonatomic) IBOutlet UIImageView *headerImageView;

@end

@implementation OrderCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setupCell:(HomeHistoryModel *)model {
    self.historyDateTimeLabel.text = model.date;
    self.historyIsCompleteLabel.text = model.complete;
    self.historyOriginLabel.text = model.origin;
    self.historyDestinationLabel.text = model.destination;
    self.historyDriverNameLabel.text = model.passenger;
    self.historyDriverPhoneLabel.text = model.phone;
    NSString *urlStr = [NSString stringWithFormat:@"%@/%@", kRootImageUrl, model.passengerHeadPic];
    [self.headerImageView sd_setImageWithURL:[NSURL URLWithString:urlStr] placeholderImage:[UIImage imageNamed:@"default_avatar"]];
}

@end
